Navigation

public interface Navigation implements Advisable<P>, Observable<T>

Allows loading resources in the browser instance and working with the navigation history.

Functions

Link copied to clipboard
public abstract Browser browser()
Returns the Browser instance of this navigation.
Link copied to clipboard
public abstract boolean canGoBack()
Indicates whether the previous location can be loaded.
Link copied to clipboard
public abstract boolean canGoForward()
Indicates whether the next location can be loaded.
Link copied to clipboard
public abstract int currentEntryIndex()
Returns the index of the current item in the back-forward list or -1 if the list is empty.
Link copied to clipboard
public static Duration defaultTimeout()
Returns the default navigation timeout in seconds.
Link copied to clipboard
public abstract NavigationEntry entryAtIndex(int index)
Returns an Optional that contains the NavigationEntry instance for the given index in the back-forward list, otherwise an empty Optional.
Link copied to clipboard
public abstract int entryCount()
Returns the number of items in the back-forward list.
Link copied to clipboard
public abstract Optional<C> get<C extends P>(Class<C> callbackClass)
Returns an Optional that contains the callback of the given type or an empty Optional if there is no registered callback with the given type.
Link copied to clipboard
public abstract void goBack()
Loads the previous location in the back-forward list.
Link copied to clipboard
public abstract void goForward()
Loads the next location in the back-forward list.
Link copied to clipboard
public abstract void goToIndex(int index)
Navigates to a specific location at the given index from the back-forward list.
Link copied to clipboard
public abstract boolean isLoading()
Returns true if any of the browser frames is in the process of loading a document.
Link copied to clipboard
public abstract void loadUrl(LoadUrlParams params)
Navigates to the resource identified by the given params.
public abstract void loadUrl(String url)
Navigates to the resource identified by the given url.
Link copied to clipboard
public abstract void loadUrlAndWait(LoadUrlParams params)
Loads the resource identified by the given params and blocks the current thread execution until the main frame of the resource is loaded completely or the defaultTimeout is reached.
public abstract void loadUrlAndWait(String url)
Loads the resource identified by the given url and blocks the current thread execution until the main frame of the resource is loaded completely or the defaultTimeout is reached.
public abstract void loadUrlAndWait(LoadUrlParams params, Duration timeout)
Loads a resource identified by the given params and blocks the current thread execution until the main frame of the resource is loaded completely or the given timeout is reached.
public abstract void loadUrlAndWait(String url, Duration timeout)
Loads the resource identified by the given url and blocks the current thread execution until the main frame of the resource is loaded completely or the given timeout is reached.
Link copied to clipboard
public abstract Subscription on<E extends T>(Class<E> eventClass, Observer<E> observer)
Subscribes the given event observer to receive the events of the given eventClass.
Link copied to clipboard
public abstract void reload()
Reloads the currently loaded web page.
Link copied to clipboard
public abstract void reloadAndCheckForRepost()
Reloads the currently loaded web page, but if the current web page has POST data, the user is prompted to see if they really want to reload the page.
Link copied to clipboard
public abstract void reloadIgnoringCache()
Reloads the currently loaded web page ignoring caches.
Link copied to clipboard
public abstract void reloadIgnoringCacheAndCheckForRepost()
Reloads the currently loaded web page ignoring caches, but if the current web page has POST data, the user is prompted to see if they really want to reload the page.
Link copied to clipboard
public abstract C remove<C extends P>(Class<C> callbackClass)
Removes a particular service callback.
Link copied to clipboard
public abstract boolean removeEntryAtIndex(int index)
Removes the item at the given index in the back-forward list and returns true if it was removed successfully.
Link copied to clipboard
public abstract C set<C extends P>(Class<C> callbackClass, C callback)
Sets a particular service callback.
Link copied to clipboard
public abstract void stop()
Cancels any pending navigation or download operation and stops any dynamic page elements, such as background sounds and animations.